package com.adderis.soft.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.adderis.soft.domain.dao.ICasDao;
import com.adderis.soft.domain.model.Cas;
import com.adderis.soft.service.ICasBo;

@Service("casService")
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class CasServiceImpl implements ICasBo {

	@Autowired
	private ICasDao casDao;

	@Transactional(readOnly = false)
	public void persist(Cas transientCas) {
		casDao.persist(transientCas);

	}

	@Transactional(readOnly = false)
	public void remove(Cas persistentCas) {
		casDao.remove(persistentCas);

	}

	@Transactional(readOnly = false)
	public Cas merge(Cas detachedCas) {

		return casDao.merge(detachedCas);
	}
	
	@Transactional(readOnly = false)
	public void remove(Integer id) {
		casDao.remove(id);

	}

	public Cas findById(Integer id) {
		return casDao.findById(id);
	}

	public List<Cas> findAll() {
		return casDao.findAll();
	}

	public List<Cas> search(String searchString) {
		return casDao.search(searchString);
	}

	

}
